import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:mandoby/core/app_export.dart';
import 'package:mandoby/core/utils/app_colors.dart';
import 'package:mandoby/core/widgets/app_bar/custom_app_bar.dart';
import 'package:mandoby/core/widgets/custom_bottom_bar.dart';
import 'package:mandoby/features/universities_available/presentation/pages/universities_available_screen.dart';
import 'package:nb_utils/nb_utils.dart';
import '../../../../../core/widgets/custom_scaffold_widget.dart';

class UniversityCategoryScreen extends StatelessWidget {
  const UniversityCategoryScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return CustomScaffoldWidget(
      decoration: AppDecoration.gradientWhiteAToBlueGray,
      appBar: const CustomAppBar(),
      screenPadding: EdgeInsets.symmetric(horizontal: 20.h),
      body: ListView(
        children: [
          20.hs,
          CustomImageView(
            imagePath: AppAssets.imgRectangle74,
            width: 40.w,
            height: 40.h,
            alignment: Alignment.center,
          ),
          15.hs,
          Align(
            alignment: Alignment.center,
            child: Text(
              "خدمات التعليم الجامعي",
              style: CustomTextStyles.font28whiteA700w800
                  .copyWith(color: AppColors.black900),
            ),
          ),
          Align(
            alignment: Alignment.center,
            child: Text(
              "اختار الخدمة",
              style: CustomTextStyles.font20black500
                  .copyWith(color: AppColors.black900),
            ),
          ),
          Container(
            width: 250.w,
            alignment: Alignment.center,
            padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h),
            decoration: BoxDecoration(
                color: AppColors.whiteA700,
                borderRadius: BorderRadius.circular(4),
                border: Border.all(color: AppColors.primary)),
            child: Column(
              children: [
                CustomImageView(
                  imagePath: AppAssets.imgRectangle67,
                  width: 40.w,
                  height: 40.h,
                ),
                Text(
                  "تعليم جامعي",
                  style: CustomTextStyles.font28whiteA700w800
                      .copyWith(color: AppColors.black900),
                ),
                10.hs,
                Container(
                  height: 4.h,
                  width: 160.w,
                  decoration: BoxDecoration(
                      color: AppColors.primary.withOpacity(0.8),
                      borderRadius: BorderRadius.circular(10)),
                )
              ],
            ),
          ).animate().slideY(),
          20.hs,
         ...List.generate(6, (index) =>  Row(
           children: [
             Container(
               alignment: Alignment.center,
               padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h),
               decoration: BoxDecoration(
                   color: AppColors.whiteA700,
                   borderRadius: BorderRadius.circular(4),
                   border: Border.all(color: AppColors.primary)),
               child: Column(
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   CustomImageView(
                     imagePath: AppAssets.imgRectangle67,
                     width: 40.w,
                     height: 40.h,
                   ),
                   Text(
                     "تعليم جامعي",
                     style: CustomTextStyles.font20black500
                     ,
                     textAlign: TextAlign.center,
                   ),
                   20.hs,
                   Container(
                     height: 4.h,
                     margin: EdgeInsets.symmetric(horizontal: 20.w),
                     //   width: 160.w,
                     decoration: BoxDecoration(
                         color: AppColors.primary.withOpacity(0.8),
                         borderRadius: BorderRadius.circular(10)),
                   )
                 ],
               ),
             ).expand(),
             10.ws,
             Container(
               alignment: Alignment.center,
               padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h),
               decoration: BoxDecoration(
                   color: AppColors.whiteA700,
                   borderRadius: BorderRadius.circular(4),
                   border: Border.all(color: AppColors.primary)),
               child: Column(
                 crossAxisAlignment: CrossAxisAlignment.center,
                 children: [
                   CustomImageView(
                     imagePath: AppAssets.imgRectangle67,
                     width: 40.w,
                     height: 40.h,
                   ),
                   Text(
                     "تعليم جامعي",
                     style: CustomTextStyles.font20black500
                     ,
                     textAlign: TextAlign.center,
                   ),
                   20.hs,
                   Container(
                     height: 4.h,
                     margin: EdgeInsets.symmetric(horizontal: 20.w),
                     //   width: 160.w,
                     decoration: BoxDecoration(
                         color: AppColors.primary.withOpacity(0.8),
                         borderRadius: BorderRadius.circular(10)),
                   )
                 ],
               ),
             ).expand()
           ],
         ).paddingBottom(20.h).onTap((){
           UniversitiesAvailableScreen().launch(context);
         })).animate().slideX(duration: 400.ms)
        ],
      ),
      navBar: const CustomBottomBar(selectedIndex: 0),
    );
  }
}
